package com.cy.shiro.dao;

import com.cy.shiro.pojo.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
@Mapper
public interface SysUserDao {

//    @Select("select * from user where name = #{name}")
    public SysUser findByUsername(String username);

//    @Select("select * from user where id = #{id}")
    public SysUser findById(Integer id);

    //用户列表
    public List<SysUser> selectAll(Map<String, String> map);

    //添加用户
    public Integer addUser(Map<String, String> map);

    //保存
    public Integer editUser(SysUser sysUser);

    //删除
    public Integer delUser(Integer id);
}
